package collection;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class SortPoint {
    public static void main(String[] args) {
        List<Point> list=new ArrayList<>();
        list.add(new Point(5,6));
        list.add(new Point(20,1));
        list.add(new Point(98,42));
        list.add(new Point(32,74));
        System.out.println(list);
        Collections.sort(list);
        System.out.println(list);
    }
}
